// -----------------------------
// Author: 		Dhaenens Gert	
// Creation: 	10/18/2014 5:57:18 PM				
// -----------------------------

#include "RefObject.h"

RefObject::RefObject()
	: m_RefCount(1)
{
}

RefObject::~RefObject()
{
}

void RefObject::AddRef()
{
	++m_RefCount;
}
void RefObject::Release()
{
	--m_RefCount;
	if (!IsReferenced())
		delete this;
}

Int32 RefObject::GetRefCount() const
{
	return m_RefCount;
}
Bool RefObject::IsReferenced() const
{
	return (m_RefCount > 0);
}